Cash upgrade - If you have a simple CX ticket, cash upgrade can be done anytime or at most airports if business seats are available on your flight. You have to pay the fare difference, which can be quite costly. If CX cannot figure out the fare from your ticket, then they may not be able to process a cash upgrade.
Mileage upgrade - You need miles in your Asia Miles account, at least enough so that you can top off. There are only limited seats, but CX may open many more seats closer to the departure date. If you do not have enough miles in Asia Miles, and if you have points in some of their partners such as SPG, you can transfer over. Note that transfer takes time.