I have all the stuff to code new keys for the x5 e53….. 😝😉
what you need is a blank key, cut to your barrel.
a copy of bmw 1.4.0 or equivalent to see what key slot you have. A piece of kit called an ak47 key reader I think… you need to remove the dme module from the car and read it, copy it, allocate the key, write the programme to the chip in the key and refit the dme (then hope you have done it right or you have bricked a new key… )
enjoy the drive and a beer!