UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oByM7a7GhPV/pjCTfgemjUdu9Z/sHFNhFf3+94DZvec='
WHERE
key_id = 'a5325c9f7cf7cf037fab8bae9dfa1f57c639fcc53ba2b9b6ea2ced8f8e82d09f'
AND (
token = 'oByM7a7GhPV/pjCTfgemjUdu9Z/sHFNhFf3+94DZvec='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)