Pakistan's Hanif Mohammad holds the record of the longest Test innings with 970 minutes during his 337 against the West Indies at Bridgetown in 1958, ahead of South African Gary Kirsten's 878-minute knock during his 275 against England at Durban in 1999.
Cook added 141 for the fourth wicket with Joe Root (85) and another 91 for the sixth with Ben Stokes (57) after England resumed at 290-3.
Jonny Bairstow made just eight before becoming Wahab Riaz's third victim, trapped in front of the wicket.
Left-arm paceman Riaz was the pick of Pakistan bowlers with 3-116 while Malik took 2-97.
It was a nightmarish pitch for the spinners as the first wicket to a slow bowler came in the 171st over when Malik bowled Stokes.
Pakistan's frontline spinner Zulfiqar Babar managed just one wicket in his 70 overs conceding 180 runs.
At close Adil Rashid was unbeaten on six and with him Stuart Broad has yet to score as England lead by 46 runs.
Root said Cook's long batting has set an example.
"Two days in that heat shows huge amount of skill, concentration and fitness," said Root of Cook's knock. "We spoke a lot about batting for long periods of time and how important its going to be to give ourselves a chance of winning and our captain has led from the front.
Riaz admitted Cook's knock had left bowlers frustrated.
"The way he (Cook) batted it was frustrating at times for me as a bowler," said Riaz. "He has got a great temperament and on this pitch he exhibited all his batting skills to the fullest."
Pakistan were once again sloppy in the field as they missed another chance to dismiss Cook when wicket-keeper Sarfraz Ahmed failed to take an inside edge off Riaz when the England captain was on 173.
Fawad Alam had let off Cook on 147 off Babar on Thursday.
Root was finally trapped leg-before wicket by paceman Rahat Ali who finished with 1-73. Root hit seven boundaries in his 14th half-century.
The remaining two Tests will be played in Dubai on October 22-26 and Sharjah on November 1-5.
-AAP