UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/4kFyMfEJwqRQXRb8pX+hs4FZo7PIIAB5m5MQi43KrY='
WHERE
key_id = '23c83a7fe484c282a11df37177bd3f5721f16be1c86e436952cf507592c2f82e'
AND (
token = '/4kFyMfEJwqRQXRb8pX+hs4FZo7PIIAB5m5MQi43KrY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)