The stationary state of a quantum particle strongly coupled to a quantum thermal bath is known to be non-Gibbsian, due to entanglement with the bath. For harmonic potentials, where the system can be described by effective temperatures, thermodynamic relations are shown to take a generalized Gibbsian form that may violate the Clausius inequality. For the weakly anharmonic case, a Fokker-Planck-type description is constructed. It is shown that then work can be extracted from the bath by cyclic variation of a parameter. These apparent violations of the second law are the consequence of quantum coherence in the presence of the slightly off-equilibrium nature of the bath.