You can use to get the last day of the month and to get time for comparison. LAST_DAY DATE_FORMAT
SELECT * FROM <table_name>
WHERE DATE_FORMAT(LAST_DAY(<date_time_col>),"%d")=DATE_FORMAT(<date_time_col>,"%d")
AND DATE_FORMAT(<date_time_col>,"%H:%i")='23:59';
Detailed explanation:
So basically, to get the right line, we need to get the last day of the month, and the last minute of the day
LAST_DAY . DATE_FORMAT . , .
DATE_FORMAT(LAST_DAY(<date_time_col>),"%d")
29, 29-02-2018.
, ? DATE_FORMAT . ( ). ,
DATE_FORMAT(<date_time_col>,"%H:%i")
23:59, - 29-02-2018 23:59:00.