The dragging velocity of a model solid lubricant confined between sliding periodic substrates exhibits a phase transition between two regimes, respectively with quantized and with continuous lubricant center-of-mass velocity. The transition, occurring for increasing external driving force F_ext acting on the lubricant, displays a large hysteresis, and has the features of depinning transitions in static friction, only taking place on the fly. Although different in nature, this phenomenon appears isomorphic to a static Aubry depinning transition in a Frenkel-Kontorova model, the role of particles now taken by the moving kinks of the lubricant-substrate interface. We suggest a possible realization in 2D optical lattice experiments.