The only time I am worried about a horse spooking when cars go by is if there is a barbed wire fence right by the road or the road has a sharp cliff drop-off on one side. Because if a car scares a horse the horse is going to run away from the car. If you think about this logically, it might ease your fears. If you decide to ride along the road, plan where you will go if the horse panics. You could say to yourself: there's a good place for my horse to trot off away from the road if the car makes him want to move away. Then try to get to these "safe" zones when you hear cars coming.
If you feel your horse is getting nervous, just jump off! It only takes a second and then if your horse spooks a little you can tell him it's OK and let him settle before getting back on. If you're leading and your horse is nervous, just circle him around your body as the car goes by. There's almost always enough room on a shoulder to do a little circle. Circles do wonders for high-headed, nervous horses. Don't try to make him stand still, just let him move until he calms down.