SQL query for updating two columns of a row while checking whether they overlap with other rows of the same table : The table below shows 3 selected rows from the session table which contains 3 sessions for the same doctor on the same day but with different, starting and ending times. 
I want to update the sessionStartTime and sessionEndTime columns of one row in this table while checking whether that sessionStartTime and sessionEndTime overlap other 2 rows. What I need is a correct SQL query for this. 

For example, I want to edit the sessionStartTime as 2018-07-08 9:30:00 and sessionEndTime as 2018-07-08 10:30:00 of the row with id=1091 and as the starting time and ending time of this session doesn't overlap with other two row values the two values should be updated.But if I entered the two values sessionStartTime as 2018-07-08 8:20:00 and sessionEndTime as 2018-07-08 9:00:00 of the id=1091 it should not allow it to edit the row as there is already another session with id=1090 which contains the starting and ending time duration.
[enter image description here][1]


  [1]: https://i.stack.imgur.com/Xufof.png

I would rather be thankful if a clear answer for this question is given sooner as I'm already stuck with the logic and query for a long period of time.