I forgot about my smart key over the weekend and accidentally put it through the wash (found it before putting it into the drier luckily). I let it sit near a heater over night and in the morning it surprisingly worked just fine. Oddly enough when I first checked to make sure the key still worked, the prius would automatically lock/arm itself after 30seconds when the key was no longer present. I was a little surprised so I tested it out and it automatically locked itself 3/3 times. Two days later, it no longer auto-locks itself. Weird!
I washed my Lexus remote key about 10 years ago. Its still working fine (on the original battery, too)!
It's not a good idea - LOL : wash the car but never the smart key in the wash; fortunately it did not go to the drier !
Same thing happened to me just a few weeks ago. Mine also survived, works just fine. BTW the "auto-locking" you mention was probably due to some residual humidity causing the lock button to be permanently closed. It can happen.
Were it me, I would dissasemble the fob, do a through rinse in DISTILLED water, dry thoroughly and reassemble with a NEW battery...