UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VocTIOlfo1Js+a5m4btD8xKRpYKS7wF2YLGplGpXO3U='
WHERE
key_id = 'ff9663e502942f0cdcef2c7167fc09193fe8b03ee5c6d987cbc5b14b6f0b621f'
AND (
token = 'VocTIOlfo1Js+a5m4btD8xKRpYKS7wF2YLGplGpXO3U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)