An approach to account for the effect of thermal lattice vibrations when calculating exchange coupling parameters is presented on the basis of the KKR (Korringa-Kohn-Rostoker) Green function method making use of the alloy analogy model. Using several representative systems, it is shown that depending on the material the effect of thermal lattice vibrations can have a significant impact on the isotropic exchange as well as anisotropic Dzyaloshinskii-Moriya interactions (DMI). This should lead in turn to an additional contribution to the temperature dependence of the magnetic properties of solids, which cannot be neglected in the general case. As an example, we discuss such an influence on the critical temperature of various magnetic phase transitions. In particular, in the case of skyrmion hosting materials, a strong impact of lattice vibrations on the DMI is an additional source for temperature dependent skyrmion stability which should be taken into consideration.