UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '53wwX5XiJdVj1lQlBuDlMz08cFqi6cH6bIfG4vSCKPY='
WHERE
key_id = '03b68a2cf7808c8d8998e5d48ff9e187f09981ae0252c64f8bb1576d131d5289'
AND (
token = '53wwX5XiJdVj1lQlBuDlMz08cFqi6cH6bIfG4vSCKPY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)