Did you start with a lit search?
Here’s two papers on elastic properties as a function of temperature:
Schall et al, Phys. Rev. B 77, 115209 (2008)
Gao et al 2006 J. Phys.: Condens. Matter 18 S1737
The simplest method is to apply the appropriate strain, run the simulation at the desired temperature, and use the pressures to calculate the elastic constants using Hooke’s law. In the papers above this is referred to as the “direct method”.
Alternatively you can run the simulation in an NHT (constant tension) ensemble and use the fluctuations in the box vectors to derive the elastic constants, again using Hooke’s law. This method often takes a long time to converge.
Lammps can do all this, but it’s up to you to figure it out how to implement the appropriate commands. For that you need to do a review of the methods.