OMGosh! Happened to me too! (Well, I locked me and the boy outside the house!) I stayed at my neighbor's til DH came home.
Now, I don't lock the door, when I'm going to get the mail, I leave it ajar (and bring my son with me....)
Also, my DS loves car keys, so I always give him mine when I'm putting him in the car seat. However, with those electric locks, he'd be able to easily and unintentionally lock himself inside if I were to close his door and walk to the driver seat!!!!!! (This didn't happen, but the thought of it made me sweat). So, IF your kid plays with your keys, be sure you leave a door open if he's inside the car!!!