Firstly, out of curiosity, is there much of a performance gain to be had by running many scripts at once? Is it worth the problem caused by the possibility of multiple scripts accessing the same row?
But to answer your question, InnoDB locks rows that are being accessed so you shouldn't need to manually lock them or check if they are locked already. I might not fully understand what you're trying to do but what I would do is first select the ID/Primary Key from every row and store them in a global array. Each script can then pick a row from the array, delete that row from the array so no other scripts pick it, and then do the processing.
Example:
PHP Code:
global $records = array();
$result = mysql_query("SELECT id FROM table");
while ($row = mysql_fetch_array($result)) {
$records[] = $row['id'];
}
//Run the multiple scripts now
And then in each script...
PHP Code:
$my_id = $records[count($records) - 1];
unset($records[$my_id]); //This row's ID is no longer in the array for other scripts to access
$query = 'SELECT ... FROM table WHERE id = '.$my_id;
//Do your processing.
...Is that vaguely what you're after or am I on the wrong track?