I had the same problem. The horse I rode wasn't even EX, he WAS a barrel racer (and a jumper, to make things worse).
I wouldn't let him canter or gallop. If he would start I'd turn him around and make him do the arena at just a trot, praise. Do different turning exercises, changes from trot/walk, make him focus on you.
Yeah do exercises that will force him to pay attention. Are you able to lunge him? Work on getting him to trot/walk while lunging and perhaps that give him an idea of what you want when you are on him. Don't let him take off into a canter if you ask him to trot, turn him around or stop him and make him trot and praise him/scratch him when he gets it. I'd assume that is often a problem with ex racers...They may not get worked with except when its time to perform. They only know to RUN. Not saying all are like that of course, but I've encountered some like that myself at the rescue. So just try to be unpredictable, ask him to do lots of different things and follow through to make sure he does them. He has to learn that he's no longer expected to just GO, but that he must pay attention because he doesn't know what you are going to ask.
I've ridden a nice TB once who wasn't even a racer, but his owner would only take him out to gallop him. Galloping is fun and amazing, but the horse never learned to just slow down and walk!
The appy I had as a project horse last year was like that; he'd been gamed for years, and only had walk-RUN 'buttons', on him.
I would just do exercises that go from walk-trot-walk, trot-walk-halt, etc...if he breaks from the trot, then put him into a small circle while verbally asking him to Trot. When he is back in the trot, go back to the rail. Start out asking for one or two strides of a trot, and going from there. Even after alot of working, he may still want to go faster...it will likely be a long time struggle with him, just because of how much a barrel horse is asked only to run. Most riders don't make sure all of their gaits are solid, they just walk, and run unfortunately. Just keep working on it, and reward ever effort he gives you.
Every day before I rode, we roundpenned. He had to learn voice commands because leg to him meant GO GO GO! I usually start with leg and introduce voice later...with him it was the other way around. The round pen activities were NOT to 'take the edge off' of him. It was to get his focus.
Like the other posters said, lots and lots of transitions. With Nico, I did lots of whoas and whoa turns. I would come up with a pattern and give him a set amount of strides to complete it. Example. I would ask him to canter, let him canter one circle and then tell him to trot. He had three strides. If he did not complete the transition, I would step in his path and tell him "whoa turn". Then tell him to trot again. If he picked up the canter again, I would turn him again.
Nico learns by knowing what he is doing wrong. No yelling, no hitting but solid *NO*. Some horses learn solely on praise. Like when your horse slows down on his own, praise him.
Good luck. If he/she was athletic enough to run games, they will probably excel in other areas.