You cannot do it!
You want to develop an application(server side) that accept input from mobile handset(client side)
I didn't understand well if your application is:
- Mobile-initiated (USSD/ PULL)
- Network-initiated (USSD/ PUSH)
but however in both cases you cannot achieve your goal.
Because session timeout is server side and there is nothing client could do about it, beside to resend the request which is not an option in your case.