UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oG7XbiBUx4+mgcvjHCfqudcR2Rkjuy8fEbpLzrIj5uI='
WHERE
key_id = '35e9fe3bdec50bedf94dd25628acbf63c5bfa49d4b4445d8f96c2e8d0c927fba'
AND (
token = 'oG7XbiBUx4+mgcvjHCfqudcR2Rkjuy8fEbpLzrIj5uI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)