If you lock a pathway but placing the stalagmite in the wrong place, is there a way to unlock those pathways?
I don't think there is any way.
http://www.totemtribe.com/bugs/view/replacing-stalagmite-pieces-in-wrong-order-locks-out-some-chests/
But this can help to avoid it: http://www.totemtribe.com/talk/the-ultimate-guide-to-caves-spoilers/