UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3olaQLSG4llkhxQPQ5TNQAaLOJicbow1c1br/6Af1LI=' 
WHERE 
  key_id = '935b28476bcd92ad4b341f7d1c58a8c1ceea91df03cfb3892811fbb8c4d8d332' 
  AND (
    token = '3olaQLSG4llkhxQPQ5TNQAaLOJicbow1c1br/6Af1LI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019