same thing happened to my wife on a loaner that we had. It was a 2012 diesel and she put her purse on the seat,,closed the door and it locked,,and couldn't get it unlocked until we called the dealer and they had BMW unlock it for us. My guess is that somehow,,it (car) was not getting the signal that the key was inside or something....IDK