Key won't go into ignition and start engine. on 2008 BMW 528xi

My car was detailed today at a car wash and when I went to pick it up, the key would not go into ignition slot. I got a warning light with a slash through the key. After several tries, the car started, but the key wouldn't stay in the ignition and the warning signal stayed illuminated showing a slash through a key. What could be the problem?

Asked by for the 2008 BMW 528xi
Not sure, but it may be either with the key or with the lock cylinder. Have you checked with the dealer yet?
The next morning, the key worked and since then I've had no problems. Maybe some dampness got into the cylinder and it dried out. It's a mystery, but all is well. Thanks for responding.