UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FRyweMtzbsrF6NCwqhCyKaCR3bSxlXa/N5wke0cTS7Q='
WHERE
key_id = '037f82d6ec73a673bf5e955b37059751cbae9a5f26d579123c89f3169db4d1c0'
AND (
token = 'FRyweMtzbsrF6NCwqhCyKaCR3bSxlXa/N5wke0cTS7Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)