Someone (locksmith) may be able to clone you a chip locally but its always best to use their chips, that way if they can't reprogram your "blank" chip you're not going to buy two of them. The door lock part is driven by that circuit board in the key, as long as you get the right frequency (315Mhz at least thru 2006) syncing that portion is easy. The chip is activated and responds to the copper coil in the ignition switch assembly and the response has to match what the immobilizer is looking for. If you get the key cut at a locksmith ask him to provide you with the key code, it should be a 4 or 5 digit number that tells the machine what profile to cut in the blank key. That way you have the info necessary to have more keys cut later without having to have the key rescanned.
It's about a 5 minute job to clone a chip in an 06 and up truck for the key but you need both the key and the truck present to do it. Your's takes a little longer because you need to remove the immobilzer (its in the center console) and use a BMW programmer to get the info off the immobilizer chip and reprogram it to accept your new key chip. You may be able to get a BMW dealer/shop to reprogram the immobilizer as that hardware is way more common than the LR version used in the later trucks). The LR dealer will charge you about 3-500 dollars to provide a new key and chip, and it takes a couple of weeks because the key (the chip actually) has to come from LR in the UK. Dealers can't program new key chips as they don't have the info necessary to do it. They may be able to clone your existing key. I've got 5 spare chips programmed (cloned) for my truck, 3 in actual keys, just in case I lose my original key.
If you lose that chip (can't tell you how many people have thrown the piece of plastic away changing bateries), you are at the mercy of the dealer to get you a new one, any you may need to have the truck towed to their lot to have it setup. So don't lose it if and when you open the key fob up to replace batteries.