2.2/develop shove mt_rand(0,100)

i have made a script to insert products in pyrocms automatically. which is adding images too for store. so looks like it is the substr(md5(microtime()+$data['filename']), 0, 15); microtime() issue. because my script inserting bulk of products. so generating same id after 2 or 3 images insertion.