For the set they built an entire Airbus A330 to 1:1 scale including a functioning cockpit.
While since 9/11 cockpit doors and locks have been strengthened, it is a misconception that pilots cannot open the cockpit door during the flight. They can and do. Pilots and flight deck crew are allowed outside to use the restroom, let flight attendants bring in food, or switch crews for rest purposes and do so on almost all flights. Less commonly they also open the door to look for any malfunction on wing control surfaces or avionics or flight control access points that are not all in the cockpit.
The aircraft's registration is G-KNDM.