I'm not sure the math will work out for you.
You should check with a lender to be sure, but what you are proposing is a "cash out refi" - those are getting very rare. If available, the lender will probably require that you maintain a 20% equity ownership in the property. An appraisal of $335,000 w/20% equity looks like a refi amount of $268,000.
You should also make sure you are not bound by any prepayment clause in your current mortgage loan. If there is, you will incur a stiff penalty if you pay off your current mortgage loan before the prepayment period expires.
Don't forget, when you refinance a mortgage you are basically buying your house from yourself. There are lender costs, closing costs, appraisals, etc. So, you need to take all of this into consideration before moving forward.