You have the option of selecting whether you would like your option exercise request to be "final and unable to be cancelled" or "edited until the cutoff time (varies by clearing house)". If you select "final and cannot be cancelled", this will allow for immediate delivery of the stock in the account. Note that some contracts will not follow this rule and will remain revocable up until the clearing house deadline. You can make this selection in Trader Workstation by going to the File (or Edit) menu followed by Global Configuration and selecting Orders followed by Settings from the configuration tree on the left side.
If you select that your submission can be "edited until the cutoff time (varies by clearing house)" then you can log back into TWS and cancel the pending request as long as it is before the cut off time.