I use 2 SQL commands. First is to get some reference values, and the second is to filter with it. The results of the first command are used as :FINISH_TIME and :START_TIME in the second.
select FINISHED, STARTED from table
where id = :ID
select * from table
where (FINISHED <= :FINISH_TIME
FINISHED >= :START_TIME)
(STARTED <= :FINISH_TIME
STARTED >= :START_TIME)
(STARTED <= :START_TIME
FINISHED >= :FINISH_TIME
FINISHED <= (select FINISHED from table where id = :ID)
You can probably get the records with an overlapping time range with just one select.
select t.* from yourtable t inner join ( select id, finished, started from yourtable where id = :id ) s on ( t.finished >= s.started and t.started <= s.finished and t.started <= t.finished --and t.id <> s.id );