UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wTlhGaUXrSstXxMqpdoPWkQjeggTg/lJ3TTHrKTNKS4='
WHERE
key_id = '56f0d12daa8de31f8ab429593c1c1463c53a547130f4fba7bdba1dcc1c054a44'
AND (
token = 'wTlhGaUXrSstXxMqpdoPWkQjeggTg/lJ3TTHrKTNKS4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)