When I bought the car I have one key. And I went to the MB dealers get two more new keys( I have three master keys).The key is worn. Go to the dealer and order a new set. All you need is the VIN. I had the same problem where the key could start the car but not lock/unlock the trunk. After a got a new key everything worked fine. It makes sense since normally you would use the key in the ignition and door but rearly in the trunk (or less often). The ignition lock and door lock would be worn in the same rate as the key and everything would keep working.
I beleive a new key is about $35 and a full set is about $80.