UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'slMvH+b8eVDmU6c29akrWsxYfpLNlf0nhhefyiLt/J8='
WHERE
key_id = '33abf5beca66c060bfd0f8d91951fb70697fbe0cdd9804c235af768f5331aea2'
AND (
token = 'slMvH+b8eVDmU6c29akrWsxYfpLNlf0nhhefyiLt/J8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)