Paid up gradation from any class to any class is possible, subject to availability. You have approach the TTE of the upper class and inform him. If there is vacancy then he allot you accommodation and collect the difference in fare and issue a receipt for the same. I have done it a number of times with unreserved second class ticket or confirmed/rac sleeper class ticket to either 3AC or 2 AC. If you want to upgrade in advance, approach the PRS counter and book the ticket in the higher class and then cancel the lower one afterwards. Though technically the same ticket can be upgraded in the PRS counter by paying the difference, as cancellation charges are very nominal if done 24 hours before it better you do booking and cancellation separately