UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3nAU2JoU97vtOo8vfQ1BETowG6olG/P/x6ZlTWDjmWQ=' 
WHERE 
  key_id = '63ea0391a4f97b55b5d80ffe22d8fc3afa3e77391211285bceeecb4002edfbfc' 
  AND (
    token = '3nAU2JoU97vtOo8vfQ1BETowG6olG/P/x6ZlTWDjmWQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039