Query keeps on executing
Apart from the fact that where not in () is almost always very slow, distinct will also be slow.

Try this, and let me know if it is better: 

select distinct(col1) 
from table1
    left join table2 on table1.col1 = table2.col1
        and table2.col2 not like '%XYZ%'
where table1.col2 &gt; 'some -time'
  and table2.col1 is null;


Note: You have to bear in mind that there could be a magnitude of other issues affecting the performance, such as hardware, indexing, other users etc.; the above query represents some improvement, but is not guaranteed to run blindingly quick.