UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9WD68FHwWPw416tiliS2JcJMHaCtgEzifUH+r4L2Jks='
WHERE
key_id = '760306a2fee0b281e6b0cc9d4d95fbb57cacd59530778123194ff5f9a01d968a'
AND (
token = '9WD68FHwWPw416tiliS2JcJMHaCtgEzifUH+r4L2Jks='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)