Cooling time of basalt flows?
Of course there is, and in not that complex. Is called the heat equation, and is a type of diffusion equation that can be easily solved numerically or analytically in some simple geometries.

If you don't want to get involved in the math, you can use one of mane heat transfer simulation software, there are even online version that run in your browser like Energy2D, in which you can configure the geometry and thermal properties of your materials and let the simulation run.

The screenshot below is a problem with the geometry you suggest. But you would need to set the correct thermal properties of air and basalt.

If you are looking for a customized equation, you have to constrain the geometry of the problem. For instance: the cooling of a laterally infinite layer of material at 1000 °C of thickness X with a medium (air in your case) above it, at constant temperature of 10°C and a medium below it (bedrock) at initial temperature 5°C, you can look at engineering formulas handbooks, or post the question on the Engineering or Math Stack Exchange sites.