Well from that statement it would be imposible to determine what the link is between table1 and table 2. (you would need some sort of join). I think you are going to have to peform a few different queries. Hence you would perform a select query:
select table1primary from table1, table2 where table1.something = table2.something and table2.time= blah blah
You should be able to use what is returned from this in order to delete the enteries.