The time you spend in a coffee shop will most likely depend upon how many customers are in the place.  If the shop is half full, consider it ‘busy’ and treat it as you would going into a busy restaurant.  As a rule of thumb, 30 minutes past finishing your order you should be ordering something else or getting up to leave. https://www.bonappetit.com/restaurants-travel/article/cmon-dont-be-that-loitering-jerk