Robbers who made off with £40m in gems were caught on camera firing a gun as they made their getaway.