UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tfs+K3JsZdcZ7Ztc9sKfOVgo/labSAFpDNtPhOzW6IQ='
WHERE
key_id = '3429a823f5428788d9c1242866067c4156038c9ae1df0fbfac747e5393b76be0'
AND (
token = 'tfs+K3JsZdcZ7Ztc9sKfOVgo/labSAFpDNtPhOzW6IQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)