UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vIX+1lULlYOs1L7Dmt5LlWgH+dUXq78ilbJagi8igsI='
WHERE
key_id = '3ac2339a72928761db8bbb11c541a5e0e796dbfcb8cb59e029a9036993d41472'
AND (
token = 'vIX+1lULlYOs1L7Dmt5LlWgH+dUXq78ilbJagi8igsI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)