UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rvx+Jj0ygUru9X7J/mmg30NfIBkTI+4SXmRyHPqmTWc='
WHERE
key_id = '6310d1f30d0dfe7b4f4826e94e02f32966c21c594b1ba36b42698baca8fbbe6e'
AND (
token = 'rvx+Jj0ygUru9X7J/mmg30NfIBkTI+4SXmRyHPqmTWc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)