If you want to want to replace the dateStart, you could use a pattern to match a date like pattern and replace the match with your new string.
Then you could update the pattern to also do the replacement for dateEnd.
dateStarth+>=h+'Kd{4}-d{2}-d{2}(?=')
Regex demo
$re = '/dateStarth+>=h+'Kd{4}-d{2}-d{2}(?=')/m';
$path = "[other values] and dateStart >= '2021-01-01' and dateEnd <= '2021-12-31' and [other values ...]'";
echo preg_replace($re, '2021-02-02', $path);
Output
[other values] and dateStart >= '2021-02-02' and dateEnd <= '2021-12-31' and [other values ...]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…