UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kOPxVTltK2J9QYYtjoKh9LzTV0PaT9XTYgDiZGaU/iM='
WHERE
key_id = '95e45ed0498cf1de21c7a9590bf5a0b44a5fa1158214fd586c2c34f0ae8f0ce2'
AND (
token = 'kOPxVTltK2J9QYYtjoKh9LzTV0PaT9XTYgDiZGaU/iM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)