UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '60B+uESmAD6tLaXOxu3/IOyol3+q91nWk7X/ehFqOBo='
WHERE
key_id = 'f4092db2a6f2f857c748a4d4fe0648ef4a8dbaa05d64cc8182986982ac55589b'
AND (
token = '60B+uESmAD6tLaXOxu3/IOyol3+q91nWk7X/ehFqOBo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)