Thermal equilibrium during the electroweak phase transition