I've got a 2-yr-old with about 12 rides on him so far. He gets a good 10 minutes or longer on the lunge line working on stopping and turning and paying attention to me. Before I mount up, I'm checking that he will flex both way and back up freely. Once he "earns it", I don't even bother with lunging.
For my 7-yr-old, I never lunge him. If we are going out on the trails (90% of our riding), I mount up and off we go. I typically ride him about 5 miles each ride. So I will walk him for 1 mile to "warm up" and also at some point during that first mile, do some bending and circles both directions when I have a safe area with good ground to do it.
If we are going to do arena work (once or twice a week), I will walk the perimeter of the arena in both directions, and then walk some circles in both directions. Then trot circles in both directions; then lope. That's our warm up, and then I start working specifically on what I want to work on that day.
At a barrel race, I kinda follow that. Walk circles, trot circles, lope circles. Bend in both directions. Follow leg cues in both directions. Sidepass. Rollback, etc. Just get him attentive and listening.