In the QueryResult object returned by the query() call, queryLocator contains a value that you will use in the subsequent queryMore() call. Note the following guidelines:
QueryLocator objects
expire automatically after 15 minutes of inactivity.
A user can have up to 10 query cursors open at
a time. If 10 QueryLocator cursors
are opened when a client application, still logged in as the same
user, attempts open a new one, then the oldest of the 10 cursors is
released. Note that cursor limits for different Salesforce.com