Thank you for your question and sorry for the wait you have had. My name is Steve and i am a fully qualified vehicle technician with over 30 years in the trade. hopefully I can answer your question.
The Mercedes ignition lock consists of three components. The key, the receiver and the steering lock.
When you place your key into the ignition you should hear a click as the steering lock is released, if the steering lock does not release then the ignition circuit cannot be completed. The steering lock can and does fail resulting in the steering remaining locked. When this happens it is difficult to remove the steering lock section. This is located at the base of the steering column.
The problem can also be with the receiver or the key not communicating correctly. Unfortunately the system is know to suffer from problems and does need to be coded when replacing any of the three ignition / steering lock components. This needs to be done with the Mercedes STAR system although some independent auto locksmiths will have the equipment.
Because your ignition is still working, albeit intermittently I suspect that the fault is in the electrically operated steering lock mechanism.
I would advice getting this diagnosed as soon as possible by a garage who have the STAR diagnostic system, as it will be easier to replace any faulty component whist the system i still operating.
I hope this answers your question, and again sorry for the wait.
If this does answer your question please click accept and rate me, this allows me to continue. Even after you have clicked accept I can continue to answer questions on the problem.