I took a trip down memory lane as I walked along the beach.
I was thinking about the good old days when I was walking along the beach.
to take a trip down memory lane を使って言うと、次のように言えます。
ーI took a trip down memory lane as I walked along the beach.
「海岸を歩きながら過去の思い出に浸った」
または次の言い方も自然ですよ。
ーI was thinking about the good old days when I was walking along the beach.
「海岸を歩いている時、古き良き時代のことを考えていた」=「海岸を歩きながら思い出に浸っていた」
ご参考まで!