UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'J+4nYI7EblkkTpQ7FeEOOLsAtFFNlFLPWKnJ3Ss1kvU='
WHERE
key_id = 'e1fb7144abd78be4588932f4f89efc1ebfd8424248203c575843f0b37b0c62dc'
AND (
token = 'J+4nYI7EblkkTpQ7FeEOOLsAtFFNlFLPWKnJ3Ss1kvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)