If you use the filemtime() value as the key, there will certainly be collisions on files that were last modified at the same time.
Have a look at array_multisort:
This example is unested, but should get you on your way.
// grab the files
$files = glob( './folder/*.*' );
// re-order the files
$files = array_multisort(
// order by modified time, ascending
array_map( 'filemtime', $files ),
// order by file name on similar times, ascending
array_map( 'basename', $files ),
// the array of files we are ordering