There's a whole bunch of things that can go wrong, it's a fiddly little system. If it hasn't seen any major attention though, it's most likely to be a combination of things rather than just one issue. The good news is, the parts are cheap, and still all available last I checked. At the bare minimum, I'd suggest anyone should replace the parking brake cable, the shoes, the rubber boots, and all the springs. In the process, fully disassemble everything, clean it all thoroughly, and put it back together with good quality lube. Since the parts were so cheap I just ended up ordering all new hardware for mine, so new bolts, cups, washers, etc. Basically everything from the lever down. If you're on a very restricted budget though, at a minimum I'd buy the cable and the shoes. Any original shoes have hardened and probably glazed, they need to be replaced if you want them to hold well. Any original cables will definitely be stretched, and once Toyota stops making them, you won't be able to find a replacement that isn't just as bad as your current one.