FWIW, there are hundreds of boats on the Swan river in Perth that raise and lower their masts every weekend to go under bridges, so yes, it can be done but is does take some initial investment to get the mechanics of it right.
In essence, you need:
A hinged mast with the hinge pin as low as possible (just above the cabin).
An A frame, normally two spinnaker
poles, with the pointy end of the A attached to the bottom of the forestay and the legs attached to pivot points on the deck somewhere near where the shrouds are.
A block and tackle set up between the bottom of the forestay and the stem head
And most importantly, the cap shroud
lower attachment has to have a solid section between the deck attachment point and the rigging
screw. The height and the fore/aft positioning of this section is critical. It must ensure that the clevis pins on the lower end of the cap shroud rigging
screws are the same height as the mast hinge pin and also that the fore/aft location is the same as the mast hinge pin. This means as the mast tilts back, the tension on both cap shrouds are maintained thus preventing (to a reasonable degree), any sideways movement of the mast as it is lowered. Normally this solid cap shroud extension is stayed or braced temporarily while lowering or raising the mast.
The method is then set up the gear
, detach the forestay from the stemhead, remove any lower forward shrouds, pull back on the backstay until the mast tilts back and control the movement with the tackle attached to the forestay / A frame point and stemhead. As the mast goes back, the A frame pivots up.
To raise the mast, haul on the tackle, the A frame pivots down and the mast raises up. Reattach the rigging and remove the gear
If you say it fast, it seems pretty easy!
Hope this helps.