Welcome to United Bimmer.
I am going to assume this is your only key to the vehicle? If so, you should really considering ordering spares. They are only available at the dealership due to the EWS system.
By the E46 post I am going to take it you have an E46. Try the key in the trunk. The trunk has a manual unlocking feature should the EWS system fail. At this point i would disconnect your battery, and leave it for at least one hour for the car to reset itself. Have you tried the key in the passenger side door? The E46 was known for a faulty GM5 Module, which controls the door locks.
As for why it may not be working, other then the GM5 module, the two most common issues are a door actuator, and the lock mechanism itself. The door actuator converts an electrical signal to a mechanical action, and occasionaly the micro switch wears out. In the lock mechanism, the peice that makes the door lock open is plastic, and has been known to fail. The only way to find out for sure is once you have opened the car.