During a search for X-ray transients in the XMM-Newton archive within the EXTraS project, we discovered a new X-ray source that is detected only during a ~5 min interval of a ~21 h-long observation performed on 2011 June 21 (EXMM 023135.0-603743, probability of a random Poissonian fluctuation: ~$1.4times10^{-27}$). With dedicated follow-up observations, we found that its position is consistent with a star-forming galaxy (SFR = 1-2 $M_odot$ yr$^{-1}$) at redshift $z=0.092pm0.003$ ($d=435pm15$ Mpc). At this redshift, the energy released during the transient event was $2.8times10^{46}$ erg in the 0.3-10 keV energy band (in the source rest frame). The luminosity of the transient, together with its spectral and timing properties, make EXMM 023135.0-603743 a gripping analog to the X-ray transient associated to SN 2008D, which was discovered during a Swift/XRT observation of the nearby ($d=27$ Mpc) supernova-rich galaxy NGC 2770. We interpret the XMM-Newton event as a supernova shock break-out or an early cocoon, and show that our serendipitous discovery is compatible with the rate of core-collapse supernovae derived from optical observations and much higher than that of tidal disruption events.