Yes, you can extend your time. You do get a fair few minutes (but I didn't time it when I played!). Save often. If you feel you're getting close to the time when Gray will return, just go back to the alarm panel outside and hit it again. When you return you should be able to continue the puzzle from where you left off.
"Bleat, Watson -- unmitigated bleat!" ~ Sherlock Holmes