UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L24GoP7m649AesXfmT18Lzc2/giTnxeHWto80v4gZ1A='
WHERE
key_id = '08a1fc1026c9a29853c2c94e4d20f501b6e8cc64eca92ba298095c64481570b5'
AND (
token = 'L24GoP7m649AesXfmT18Lzc2/giTnxeHWto80v4gZ1A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)