I generally ride for around 45-60mins on weekends. During the week I ride before work at 6am, so am short on time and only ride for 30mins generally, or lunge.
If the horse is having a particularly good day, I'll still ride for a reasonable length of time - because I ride official dressage competition, my horses need to be fit and strong enough to cope with that - if I got off after 10 mins every time they were good, they would be very unfit! My rides are always a mix of something the horse finds a little hard, and things the horse finds easy and enjoys doing, so that they get a reward for their good work and don't feel resentful towards the harder work.
On a bad ride, I'll try and break the 'problem' down into very small chunks and see if the horse can master a small chunk at a time. I'm not scared of getting into a bit of an argument, but I won't take on a fight that I can't win, so always chose my tactics carefully if I run into a sticky movement.
Even if I can get the horse having a go at that movement, then I'll go straight back to something easy that the horse enjoys, for a break, and then go back and ask for the hard movement again.