I totally understand how you feel, it happened to me a while back at work, except he outright gave me his number, I’m also middle aged and it felt ‘off’ to me and took me by surprise.
I actually felt it wasn’t appropriate to ask me out while I’m at my job, I mean would someone do that with a doctor? A dentist? No. So why feel it’s okay to chat up shop assistants, we’re doing our jobs too and we’re not on sale! I agree it’s fine to assert your boundaries but if you don’t feel comfortable being direct that’s okay too, there’s subtle ways and means of letting people know you aren’t available.