The melting of an ultrathin lubricant film is studied at friction between atomically flat surfaces. We take into account fluctuations of lubricant temperature, which are defined by the Ornstein-Uhlenbeck process. Phase diagrams and portraits are calculated for second-and first-order transitions (the melting of an amorphous and that of a crystalline lubricants, respectively). It is shown that, in the former case, a stick-slip friction domain, separating the regions of dry and sliding friction, appears. In the latter case, three domains of stick-slip friction arise, which are characterized by the transitions between dry, metastable and stable sliding friction. The increase in the correlation time of lubricant temperature fluctuations leads to increasing in the rubbing-surface temperature needed for realization of sliding friction. The stationary states, corresponding to dry, stable and metastable sliding friction, are reached as a result of damped oscillations.