"We had a very short pre-season training session to give our international players more time for rest," Zenit manager Andre Villas-Boas said.
"That's why we failed to show our best today making too many mistakes.
"But I think we were the better side today especially in the second half."
Senegalese striker Baye Oumar Niasse put Lokomotiv 1-0 up in the 28th minute when he beat Zenit 'keeper Yury Lodygin with a low shot from just outside the area.
But in the 83rd minute Zenit were level when Axel Witsel knocked on a free kick by Hulk to right back Igor Smolnikov who scored with a close-range header.
Extra time failed to produce a winner and in the penalty shoot-out, Zenit took the early advantage as Hulk scored the initial shot while Lokomotiv forward Maxim Grigoriev hit the crossbar.
Oleg Shatov gave Lokomotiv a chance to level as his shot hit the post, but Lokomotiv skipper Vedran Corluka sent his weak penalty straight at Lodygin before Domenico Criscito netted Zenit's winning spot kick.