UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YvqFHuRKCM/xD5VbNvtOuEW7XNIi3BwHpKz6si2PAVA='
WHERE
key_id = '14025c8cb63799226697c3c114e78dcd2bf787fca2911beaf1af5a594403f3e3'
AND (
token = 'YvqFHuRKCM/xD5VbNvtOuEW7XNIi3BwHpKz6si2PAVA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)