Actually, you can just avoid this completely if you take a working lock to a locksmith that knows what they're doing. Just make sure you take them a lock that was also working with the ignition with the key you recently lost.
I recently took down my passenger door lock and trunk lock to the local locksmith (They've been family owned and operated for 90 years here in San Bernardino) and he recut the locks to my key because they were inoperable due to theft from years ago. I also handed him a new Toyota blank to replace my 3rd or 4th hardware store copy, by then he noticed the terrible disrepair of the key I gave him, and so he refused. He asked me to bring down my drivers side door lock (my only operating lock aside from the ignition) and he cut a key from the lock. Something I never had even thought of before.
Take a lock to someone who knows what they're doing and you'll get set up right. And its really cheap in comparison to replacing. Plus you'll get a key that's a thousand times more accurate than if you were using a generic copy.
The older gentlemen who owns the place also told me that these are the best locks Toyota ever made (he told me this upon just seeing the doorlocks, so I think he has quite a bit of knowledge lol) so thats a cool little bit of information for those who have Toyota's post 87 and up through the early 2000's?. Here's the difference between years of bad copies and cutting a key from a lock.