I have a working used Gen2 smart key from a 2004 Prius, the key was purchased in 2012. $20 with free shipping so it can find a new home.
In my experience a used Gen2 Smart Key can be programed using Toyota Tech Steam to a new car however it will not operate as a Smart Key. The remote lock functions will not work and the proximity sensor to use the touch locks will not work. It at best will be a dumb key that can used to start the car if placed in the key slot. You can assume the little metal key has been cut to fit the original car. Blanks are available on ebay or your take your original metal key and have a standard size key cut as a spare at any place that cuts house/car keys. This gives you a solution for a lost smart key when away from home. Imagine this: you can have a metal key hidden on the outside of your car so you can unlock your car and you can hide the dumb key somewhere on the inside of the car to start the car once you get inside. Only Smart Keys that have been used fewer than X times can be reprogrammed for a different car. I think X = 50 but I could be wrong about this number. If this Smart Key has been used more than X times it at best can become a dumb key used to start the car if reprogrammed with Tech Stream.