Is the approach you have mentioned a custom solution you have implemented ?
Where is this value of '12 hour flag' hard-coded ?
In IIR the search and sorting is done in memory and are not loaded back to database.
Yes, IIR search and match is done in memory (say on the IIR server), but when the result is passed back to the system that issued the query, that system is free to do whatever with it, including persist it in a database. The static stale flag can, therefore, be as simple as comparison to 'inserted' timestamp of the result.
But what I am asking about better ideas for making it dynamic. I've suggested one in the original post, but it's not overly elegant, so looking for better suggestions.