UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G0jgmG9V+Re4F2UuV5HKRn3Q0+Q3A0DRzTPjUWO4rfI='
WHERE
key_id = '35ebd6aee84a2fe3dda12ee6e0ccdf0cdcdb6d65705b15fbd345092591b4d8e3'
AND (
token = 'G0jgmG9V+Re4F2UuV5HKRn3Q0+Q3A0DRzTPjUWO4rfI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)