UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VX/1igzT/X9tbVRlJQyEVu581ZBNDXFeGXBDLzSZ8lM='
WHERE
key_id = '515bab8e94ba89475a629855db15897faa26e99ab0bd7b21c7c1637d620c218a'
AND (
token = 'VX/1igzT/X9tbVRlJQyEVu581ZBNDXFeGXBDLzSZ8lM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)