I had a similar problem on my 1990 Camry project car, actually the key would fall out of the lock when driving

quite annoying. It was also difficult to turn from off to ACC or START sometimes. I got the key code from the passengers lock and had Toyota make me some new keys, it helped I was still able to pull the key out of the ignition with the car running.
I ended up pulling the lock out, drilling out the pin and the peened tabs so I could take the lock apart and have a look at it. Turns out the lock was actually okay, but had a lot of crud and dirt in it. I cleaned it with solvent, and greased it up with synthetic grease. To assemble it, I put dabs of JB-Weld on the areas that I had drilled out (it does stay together without it but just to be safe). The lock works great now, and you can't pull the key out anymore with the car running.
I would imagine a locksmith will do basically the same job I did, but he would also have access to various parts if needed. I would have taken the assembly to a locksmith but I don't know any off hand so I just did the job myself. Easiest way would be to buy a new lock and take that to a locksmith so he can set it up for your existing key, if I have this type of problem again that's what I'm going to do.