UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '44RS496Gq+/VfizgXlDL7xVrpKXkUv2rWQfzBRMxZLg='
WHERE
key_id = '6e5a733328bdff0792842bdeb33e70e6daa36bf147a315ad6a6fdcf9e080b9e6'
AND (
token = '44RS496Gq+/VfizgXlDL7xVrpKXkUv2rWQfzBRMxZLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)