The first equation applies at any T, but you might only know ΔG° at 298K or some other specific temperature. If you know ΔH° (and assume it is temperature-independent), you can use the second equation to calculate K at any other temperature within reason.

Your second equation is not quite correct; it should be d(**lnK**)/d(1/T) = ΔH°/R