I was simply saying if you understood how to use phpmyadmin that you could issue a query based on a specific category to understand what sold expired ads should show up. 30 was an example of a categories id. You would replace that with whatever numeric id you wish to explore sold ads expiring in a specific category on your site.
If I knew what site this was I could tell you more as I might even still have access and I know I have worked on your site before but we have 40000 customers so I hardly ever remember whose site is who's without a link.
You can not tell whether an ad should or should not appear based on its posting date which is the only date that is shown. Any ad that is sold or expired in the past two weeks should show on your site. anything that is older would not. Setting your timeout to 0 tells me that your code is working as it should. You should get different results depending on the days you set to show expired ads.
Ads expired over two weeks ago should be deleted from the system when you visit the main admin index of classifieds.