Helical Buckling and Lock-Up Conditions for Coiled Tubing in Curved Wells