KM 586 then FR 5993 at Madrid
Valletta → Madrid → London Stansted
Timetable, Madrid time
20:40KM 586 from Valletta at the gate
13:20FR 5993 to London Stansted leaves the gate
16 h 40 apart on the timetable, overnight
FR 5993 leaves 16 h 40 after KM 586 arrives on the timetable: more than half a day, so not a connection we count.