I recently watched a no start issue and the guy changed the cam shaft sensor.
P0340 Cmp Sensor / Circuit B1
Your code is for a faulty key or not programmed?
Why not try the second key.
Yesterday I experience a lock issue the car would not lock so I had grabbed the key nothing still.
After a few seconds I realised.
If I put key into ignition and turn it till the lights up on dash then removed.
The car then would lock again.
Bit of a malfunction or just a weird block of my central locking.
Because its always worked before have not noticed this problem once till yesterday..