title: Salesforce SOQL INVALID_QUERY_LOCATOR exception
body: <p>When i try to pull many contacts using SOAP API i get NVALID_QUERY_LOCATOR exception.
  INVALID_QUERY_LOCATOR exception occurre when any query having sub query takes a long time (more than 15 Mins) to execute at SF server and meanwhile SF DB object gets expired.</p>
  
  <p>This exception occurred while executing below query – </p>
  
  <pre><code>Select street, city, country, email, firstname, mobilephone, lastname, postalcode, state, phone, fax, id from lead where Email!=Null and BH4SF__Opted_Out__c = false and id in (select leadid from CampaignMember where campaignId = '70160000000Mk5FAAS') order by Email, CreatedDate
  </code></pre>
  
  <p>any help on how to resolve this?</p>