Exactly what I was going to advise.
A Locksmith I call on and recommend in the South West is on a retainer to local Ford dealer and they call him in to do keys then charge customers far more than if they went directly to the Locksmith.
To put it into perspective, the Locksmith will cut, code and test the key for about half what Ford would charge.
TBH if the key still starts the car but is a bit ropey for remote locking/unlocking that would suggest that the immobiliser chip is still good but the buttons on the RCL circuit are worn.
Just buy a key with everything in it and transfer the transponder chip over and reprogram the RCL circuit which you can do yourself in minutes.
Which key you have will define what you need to do-
If it's one like this-
The chip is a glass tube in the top corner of the fob when you remove the key blade (horseshoe)
If like this-
The chip is as flat grey unit (known as a carbon chip) in the head of the key where the blade is and is a doddle to do as you just put the original blade head onto a new key body.
Be aware that the chips are not transferrable between the two key types as they're a totally different design.-
(first key type)
(second key type)