UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iIFuSeYNniNlUqVlEGNZnJZFJnb/BS/8bbBxcNvIkLo='
WHERE
key_id = '25876be5f1875519bf8c45ad5f94efe55fc44f837e760f36f907cc260aac2b99'
AND (
token = 'iIFuSeYNniNlUqVlEGNZnJZFJnb/BS/8bbBxcNvIkLo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)