Upgrades are first prioritised on the basis of status. I’m uncertain whether OW status is treated equal to QF status, but I’d speculate that QF status comes first. I also believe that the date you enter the upgrade lottery queue helps. Fare subclass is also a factor IIRC.