UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VW2lNjezyOJToTqX/BydgXIGUX8x1fSUIXdBqIu/Bdc=' 
WHERE 
  key_id = '94aa24deb3b47d87a433ff14f2de0edba43e554272c32ae3a9c9d63f2fd5af92' 
  AND (
    token = 'VW2lNjezyOJToTqX/BydgXIGUX8x1fSUIXdBqIu/Bdc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018