UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HxnCRAwrDwZmYo8B/ZkXgnn+yglkAvtPVrBqXk/QgPM='
WHERE
key_id = 'c5c9867c561c41386545a82866b938ddb7cd8f7c157b95fdc1717dedf8e33aa0'
AND (
token = 'HxnCRAwrDwZmYo8B/ZkXgnn+yglkAvtPVrBqXk/QgPM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)