UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0hSlgoFShnb8flQWRXtkgNTRCtMHJ/CJN9RBWh7ECxs='
WHERE
key_id = '9439e94b7edddd81be9f67628fbaa5b52454bd46d9aec00afcc7b5776b79f5a7'
AND (
token = '0hSlgoFShnb8flQWRXtkgNTRCtMHJ/CJN9RBWh7ECxs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)