either your mechanic is misinformed or you did not pay attention to what he was saying.
Your car can have a total of 8 smart keys active at a time, The slots of those 8 can be written three times - meaning the car can have a total of 24 keys in its lifetime. Im pretty sure I have not run across any MB yet that exhausted all 24 keys.
The way a key is coded is best understood as the two chips in the EIS (electronic ignition switch) have a hex table, that hex table needs an authentication challenge which is answered by the key, meaning that you need that information to code the key. You can get it from the EIS itself if you have some advanced tools (north of 1000 euro).
I never suggest you get the EIS dismantled and worked on to get a key code, this invites a window of error that is irrepairable, you might get away with it, but also note a reflashed EIS can be swapped if you can somehow find it. (Its not as easy as it seems) The problem is that the security build code of the car is stored with MB and they will never share it with you unless you are one of their authorised agents. Thats why its incredibly easy for them to make a key, they know exactly what was written into the EIS, ESL and ME unit (and also into the gear shifter if applicable - e.g. W220)
If you purchase a key from MB, you have to tell them if its a replacement or new key, the replacement means that the old key will be killed in the DAS, a new key means that the old key hash is not deleted. The replacement key takes approximately 45 minutes to bootstart the EIS (keep battery on charger). New key is plug n play under 60 seconds.
If you ask a keymaker to clone your key, its a bit of a gamble, if the key hash is divorced accidently or the key is locked out in EIS by error of EIS or the coder, you lose all cloned keys - thats why I never advise to get a "chaabi ustaad" to clone a key.
I think its best you contact MB, provide your documentation of proof of ownership of vehicle and order a key, it should be in the range of 200 euro at best. The key will arrive and your car will start.
This is only applicable if the EIS is responding, you can test it with either benz specific diagnosis software or with a unit that than directly talk to the EIS (such tools do exist - price noted above).
If the EIS is bad then a new EIS is incredibly stupid expensive from MB as they ship it from germany, On the other hand, there are some vendors that can ship you a rebuilt and reflashed EIS, but they would need other info from your car too.
Now to the incredibly strange part, the EIS is the security gate for all CAN networks in the car, without a correctly worked EIS the car will not work correctly.
If you wish to replace all components, you need the EIS, ESL, ME, ABS, ESP, BCM in rear (vacuum pump) and gauges of the exact same build of car built in same plant.