$where = "
WHERE price_set_id = %1
AND is_active = 1
-AND ( active_on IS NULL OR active_on <= {$currentTime} )
";
$dateSelect = '';
if ($doNotIncludeExpiredFields) {
$dateSelect = "
+AND ( active_on IS NULL OR active_on <= {$currentTime} )
AND ( expire_on IS NULL OR expire_on >= {$currentTime} )
";
}