Perhaps something along the lines of:
$url = 'http://www.website.com/index.php?pag...&action=bestel';
$url = (stripos(parse_url($url, PHP_URL_QUERY), 'bestel') !== false)? str_replace('http', 'https', $url): $url;
echo $url;
Granted, in your replacement url, I am noticing that ?pag becomes ?pa. Not sure if that is a mistype or not (I am assuming it.. thus assuming that the only change is from http to https...)