For anyone reading this in 2019/2020, here is how to works.
Mercedes takes key security extremely serious. All Mercedes-Benz smart keys that use an electronic ignition come from a Mercedes facility in Dallas, Texas. There is no other source. If you go to your dealer, they put in an order form to Dallas. To order a new key, you need the car at the dealer with matching license and registration. They are expensive, often $250 or more. There is no way to reprogram a used key at all. Once the key is assigned to your car, that is it. It stays that way forever. Keys come pre-programmed. It depends on the year, but sometimes the work straight out of the box, sometimes you have to leave the key in the ignition to pair for an hour.
You can swap shells of old keys to new keys if they are the same size. This isn't something to do if you don't know what you are doing because if you screw something up or break it, and only have one key, you are screwed. You'll have to flatbed the truck to the dealer to order a new one.
Also remember, the key batteries have nothing to do with the function of the key starting the car. The batteries only run the function of the key to control the locks. You can literally take the batteries out of the key and it will still start the car. Also, be careful with them. Don't throw them or drop them on the ground. They can stop working at a moments notice now that they are getting up there in age, and if you are far away from your 2nd key, you are are screwed again.