Squeezing out of a tube is not a violation of Shabbat. As a further precaution one can squeeze the closed tube before Shabbat so that the pressure will expel the cream when the cap is removed on Shabbat, without any need to squeeze more, but this is not essential.
However, meiruach (spreading or smoothing the lubricant) is prohibited on Shabbat. You could place the lubricant on your body and allow it to spread naturally during use.
We understand that there is a liquid version of KY available. If it is truly liquid, with no thickness, then there would be no problem with its use on Shabbat. Alternatively, there are other lubricants on the market, such as Replens, that claim to have longer-lasting results and thus could be applied prior to Shabbat and not produce any question.