I've read about this issue at numerous places. Just gonna copy paste some responses for you. Hope it helps.
" My car and many others had the exact same thing happen. All of the sudden, the car won't start. I originally started out my cleaning and re-tightening the wires to the starter. That worked for about 4 months and then it got progressively worse. I finally just replaced the starter and my car has been fine since."
"Simply pushing the car a little back and forward (in gear and then in neutral) making sure the electronics know its in neutra solved my problem."
"It happen to me before 1st got in the car in morning car wont star(not even crank) Tried it again 10 min after car starts again. 3 weeks later while driving in freeway lights in dash sudden appear dsc,abs,tires etc. and the suddenly car loss power and stop. I got it tow to my mechanic look for all the problem cant find it. He call me couple days later told me to bring my extra key so I did. Car start right away( my master key went out so thats why while driving car stall thinking car is being stolen(EWS security) now make sense.
Hope this help a little GOODLUCK!"
"hey guys! i went to pick up my key today, got home and started the car and guess what................!!!!!!!!!!!!!!! It worked!! it was the transponder after all, thanks everyone for your help! now i just have to get the buttons initialize"
"Happened to me a few times too.
I just reinitialized them:
1) Put key in ignition and turn to pos. 1 quickly and back.
2) Remove key
3) Hold open button and press close button 3 times.
4) Release open button.
Doors should now lock and unlock to acknowledge it worked.
Do steps 3 and 4 for the spare keys.
5) Finalize by putting key in ignition and turning it to pos. 2.
Don't know why the key didn't work anymore and what the solution is to prevent it from happening again."
"The door lock function is completely separate from the EWS (anti-theft) function. And before assuming it's the key - it's really worth checking the starter, they have a MUCH higher failure rate. The EWS part of the key does not use a battery, it is powered up by an RF field generated when the key is inserted in the keyhole (there is an antenna around the keyhole - the black lip thingie.)
And rolling the car back/forth does NOT rotate the starter, so it's not a good test for a defective segment in the starter armature.... At best - the vibration caused pushing the car might jar the brushes back into contact with the armature, making connection. So would beating on the starter with a stick (if you can reach it..) To really test if the EWS system is causing this - you need either a BMW code reader, and/or a voltmeter connected to the solenoid coil connection on the starter."