Constantly checking for activity in a page then log out if no activity
I would route all ajax calls through 1 function in JavaScript, and that function then keeps track of the last call. In essence, the browser itself should know whether there was activity or not.

If for some odd reason you need multiple windows with the same session to stay open as long as one of them has activity, then I would change the timer from 3000 to 60000. Checking once a minute should be more than fine.

Finally executeQuery is a terrible name, perhaps checkTimeOut?