Or simply model your process as below which will take care of everything.
ID holds id on which correlation condition will be satisfied.
isProcessed is boolean which will tell the process if the token is already received. Initially it is FALSE.
Both the intermediate event uses the same correlation condition as shown in above fig i.e. only ID.
The message used in intermediate event is used again in automated activity just before the end of process (in "Send message to cancel 2nd token") to provide 2nd token and get the process out of "In Process" state. This automated activity will use the same message with the same ID satisfying correlation condition which will help processing 2nd intermediate message event.
After the execution of "do some processing" which is where business logic will be executed, isProcessed is set to TRUE. isProcessed is checked in exclusive gate after "Uncontrolled Merge" to tell process if business logic to be executed or end the process. When process will explicitly send the message just before end, isProcessed which is set to TRUE causes 2nd token to route to END. Hence completing the process.
-Abhijeet