If I bought a cup of coffee at your shop and sat down, only for you to tell me that laptops are "not allowed," I'd be very unhappy with your store. Anyway, this is why coworking spaces exist.
Your $3 coffee doesn't entitle you to sit there for an hour though. If I was running a cafe, I'd expect that you'd be leaving within 5 to 10 minutes of finishing your coffee. The very few times I've worked in a coffee shop, I've done that myself. It's not a coworking space.
Read up on the history of cafes. This is what they historically were—places for people to be, not grab and go. If a coffee shop owner wants grab and go customers, they’re a glorified vending machine. (The article notes a conversation-versus-quiet dynamic that I can better empathise with.)