I know this is an old one, but i recently searched for the answer to this in my archive, so I decided to place it here as a reminder.

Do you get the problem: every time I run HAT Query/Messages sent in pass day OR Query/Messages Received in pass day –  I get the following error:  The following error occurred when executing your SQL Query on the Tracking Database:  Timeout Expired

Well do this:

There is a registry setting:

ConnectionTimeout is a dword, set it to 0 and it will never time out, you
can also set it to 100 or 500 to increase the time out so it will time out,
but after a longer period. Restart hat to have it effected.

However, there could be a larger issue here, check the size of your DTA
database. If its massive you should purge it, and trim it. It is a potential
performance issue waiting to happen. Post SP1 there was a hotfix to allow
you to do this.