i guess u r buying a 1-way ticket LHR-Moscow?
if that is the case, you might want to switch it a bit. i.e. make MOS part of your OWE ticket.
e.g. CAI-LHR-CAS-MAD----.......-LHR-[CAI]inbto CAI-LHR-CAS-MAD-..........BKK-(on AY)-HEL-(jump plane there)/lhr-[CAI], from HEL u can take the ferry to Estonia(Tallin) and take the train from there
as exmo indicated, u can spend 23 hours in MAD or CAS, or any city in your trip for that matter, it won't be counted as a stopover.
-------------------------
cairo-london-casablanca-madrid->quito-santiago-easter-santiago-rio/punta arenas-santiago->auckland/christchurch-brisbane-alice springs-darwin-Adelaide/sydney->tokyo-hongkong-bangkok-bombay-bangkok->london(transfer)-cairo