As you can see here: Forms Authentication Timeout Logging, you cannot detect it at the exact time that it times out.
What you can do is to check the forms authentication ticket in Application_PreRequestHandlerExecute. This means that you can only check it at the times that the user makes requests to the server so if the user close the browser, you cannot detect this event until the next time the user visits your server again.
You can somehow work around this by using ajax requests in the background but that will only work as long as the user keep an open browser window with a page on your site loaded. Note that this may stop the timeout from happen if you have a sliding timeout.