Had the same problem myself mate. Its probably not your barrel thats fucked and more likely to be that your key has got so worn down that it slipped out of the barrel with the car in on the ON position.
Simple enough to fix though.... firstly get yourself a new key. You could go to BMW and swap a arm and a leg for one or just pop down to your local locksmwith and get him to cut you one. Make sure the head of the new key has a space for the immobilser chip. (You can pop it out of the old key and into the new one).
To unjam the barrel, unscrew the ignition switch (its the orange round part with wires coming out of it on the opposite side of the barrel to where the key go's in) There's two screws holding it in.... they mite be covered in a bit of plastic, just pop the plastic off.
Once ya got the ignition switch off ya'll be able to see the turner on the barrel (a small metal bit that sticks out and turns the switch) Get a plyers and turn it. This'll unjam it, leave it in the off position.
Then put everythin back together and use your new key. Should work a charm. To this day if i put my old key in the whole thing will lock up but they new key works perfectly.
Hope this helps mate, any questions just ask.