Let $\mathcal{S}$ be a category, fix an object $S \in \mathcal{S}$, and fix two functors $F\_i : \mathcal{C}\_i \to \mathcal{S}\_{/S}$ for $i=1,2$ where $\mathcal{C}\_i$ are arbitrary categories.


Suppose $\mathcal{S}$ admits all colimits indexed by $\mathcal{C}\_i$ and by $\mathcal{C}\_1 \times \mathcal{C}\_2$.


Then we have a natural map


$colim\_{\mathcal{C}\_1 \times \mathcal{C}\_2} (F\_1 \times\_S F\_2)
\to
(colim\_{\mathcal{C}\_1} F\_1) \times\_S (colim\_{\mathcal{C}\_2} F\_2).
$


Question: Under what conditions on $\mathcal{S}$ and the categories $\mathcal{C}\_i$ is this map an equivalence/isomorphism? What if $\mathcal{C}\_1 = \mathcal{C}\_2$?


I would also be very happy to understand on what kinds of general principles the answer relies. Is this the kind of statement one checks by hand for $\mathcal{S} = Sets$ and when $\mathcal{C}\_i$ are small, then assert some Yoneda-type argument to know it's true for categories satisfying certain properties (e.g., compactly generated $\mathcal{S}$)? Or is it simpler than that? 



Fiber products of colimits
This is just a two-sided way of saying that $\times\_S$ preserves colimits in each variable separately (note that $\mathrm{colim}\_{C\_1\times C\_2} = \mathrm{colim}\_{C\_1} \mathrm{colim}\_{C\_2}$). So in particular it's true whenever $\mathcal{S}\_{/S}$ is cartesian closed, and thus whenever $\mathcal{S}$ is locally cartesian closed.


