Toyota Tacoma - parking brake lock engaging?

I have a 2000 Tacoma that has the typical issue of occasionally not being able to turn the key in the ignition unless I turn the steering wheel slightly. Recently I have had two occasions when the key won’t turn even when I turn the steering wheel. A friend looked at it and said that, because I am parked on an incline, the load on the parking brake is causing it to lock there. He was able to get the key to turn by rocking the truck back and forth while turning the key. My question is, why is this suddenly happening and what can I do about it?