How to get an exclusive connection in AutoRestore job ( sp_RestoreGene)?
To get exclusive database access (provided it is not used in replicaiton or logshipping or any other HA/DR), OFFLINE it.

ALTER DATABASE DB_name 
SET OFFLINE WITH ROLLBACK IMMEDIATE


Make this as a first step and then run the restore script that you generated.

BTW, its  Paul Brewer's restore gene script that you are using.