UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u8n0Eu0ivKf/G+NPDaexzahQqTk/3Q8jRWaTXmmHHmM='
WHERE
key_id = 'fffc71f57999190408dcbdfacb6af4af34df648cdfba6496ca58e230738000a3'
AND (
token = 'u8n0Eu0ivKf/G+NPDaexzahQqTk/3Q8jRWaTXmmHHmM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)