UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5NVj51ARQknRlJJXRLMIWKZSK6EF5/v98ghl1RM0mXQ='
WHERE
key_id = '1858753fdcc25999237c7391348f86ef45250d272c51cc47bb6defb32f17a74d'
AND (
token = '5NVj51ARQknRlJJXRLMIWKZSK6EF5/v98ghl1RM0mXQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)