UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+FFsCcCeyhToE5i2ksgdGCfysFdtSQ7WHUFvEjtR/F4='
WHERE
key_id = 'f3fb431056c3dfe757056745acd46bf5233c48bee0ade11ed9cf836269714cf1'
AND (
token = '+FFsCcCeyhToE5i2ksgdGCfysFdtSQ7WHUFvEjtR/F4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)