Hibasan parameterezed a lock filet letrehozasat. Probald ugy krealni, hogy ne hozza letre a pointert/hibat toljon/exception-t adjon ha mar letezik. Mivel a file letrehozasa atomikus muvelet 2 vagy tobb process nem fogja tudni letrehozni a filet egy idoben, igy csak az fut tovabb akinek sikerul.
http://php.net/manual/en/function.fopen.php
'x' Create and open for writing only; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING.
...
$fp = @fopen($lockfile, 'x');
if(!$fp) exit();
fclose($fp);
... // az elvegzendo muveletek
unlink($lockfile);
...