Long-lived gravitational wave (GW) transients have received interest in the last decade, as the sensitivity of LIGO and Virgo increases. Such signals, lasting between 10 and 1000s, can come from a variety of sources, including accretion disk instabilities around black holes, binary neutron stars post-merger, core-collapse supernovae, non-axisymmetric deformations in isolated neutron stars, and magnetar giant flares. Given the large parameter space and the lack of precisely modeled waveforms, searches must rely on robust detection algorithms, which make few or no assumptions on the nature of the signal. Here we present a new data analysis pipeline to search for long-lived transient GW signals, based on an excess cross-power statistic computed over a network of detectors. It uses a hierarchical strategy that allows to estimate the background quickly and implements several features aimed to increase detection sensitivity by 30% for a wide range of signal morphology compared to an older implementation. We also report upper limits on the GW energy emitted from a search conducted with the pipeline for GW emission around a sample of nearby magnetar giant flares, and discuss detection potential of such sources with second and third-generation detectors.