All of my doors lock when I put it into gear and when I put it in park and turn off the vehicle the driver's door only will unlock.
This has happened to me twice, first time headed out of my yard to go to work, stop to open my gate and close the door....LOCKED with it running and I only have one key, I had my fob in my pocket because the little keyring loop is broken but the fob wouldn't unlock the door, I thought dang the fob battery is dead....paid a mobile locksmith $80 to come and get it opened because I needed to get to work, took him 30 minutes to get there and another 15 minutes to get it open, I didn't ask how much it would cost before he came out and I was shocked at the cost, I was thinking $40/$50 max, On my way to work stopped and got a new fob battery so this never happens again....or so I thought...the second time the same scenario and the fob again wouldn't unlock the door, I wasn't about to pay that much again, so I went inside got a coat hanger and 2 screwdrivers, used 1 screwdriver to pry to door open a little bit and jammed the other in the gap to keep it opened, it took me about 30 minutes but I finally got a good hold on the lever to open the door, pulled and the door opened, this is the same way the locksmith did it but he had all the proper tools to do it right, which I also now own the same tools and used them several time to unlock doors for others, now I never ever close the door if I get out and it's running even though I can get it open in about 15 to 20 minutes max with my new tools, I still haven't got a second key, I do have a OEM blank I bought online that I want to get cut via using the VIN number but my local Toyota dealer parts supervisor refuses to cut it because I didn't buy it from them saying she can't be sure if it's an OEM blank and they are only suppose to cut OEM blanks on their key machine because they don't know what kind of metal it's made from and it can damage their machine, unless it's made of very hard steel it's not going to do any damage at all, I even had her bring out one of their blanks and you can't tell the difference in the two blanks, I even scratched my blank with my knife to show her it wasn't a very hard material...but I think she just wanted to get me to buy their blank so I left.
That all being said, I have always closed my door with it running 100s of times and it only did this the 2 times, I have never given it another chance to do it again but I know it would happen again at some point if I closed the door to open my and close my gate, I just would never know when it would happen, but I'm pretty sure I now know why it happened, I noticed several times since that sometimes when I pull the lever to get out that the heel of my hand has pressure on the lock rocker and a few times even thought the door opens the lock rocker is all the way in the unlock position so I did an experiment with the window down and running I pulled the lever and made sure to put pressure on the lock rocker so it wouldn't move all the way to the unlocked position, I then closed the door and reached outside to open the door and it wouldn't open, as far as the fob not able to unlock it while it's running I figure it's just the way Toyota designed it, but not a good idea IMHO, what if a kid got locked inside the fob should be able to unlock it at any time!!
I would assume a second key would unlock it if it's running but I don't know for sure.