Similar to the question at MYSQL: Find Start and End Timestamp of a consecutive count, I have a table with similar data:
StatusTime | Reading 2014-01-01 0
Try this code:
select * (select max(StatusTime) from tbl where Reading > 50) above_50, (select min(StatusTime) from tbl where Reading < 50) bellow_50;