A few things, first off the answer depends on the collection you are trying to paginate. A few of the early collections on Terra unfortunately have a bug that prevents pagination using all_tokens. More details on the bug here:
Ultimately start_after is expecting a token_id not an offset. So if the contract is not affected by this bug you can use the token_id of the last token in the first query you make.
If you could share the collection I’m happy to come up with an example!