At Shinagawa Station there are definitely lockers "train side" (

) inside the ticketing gates, so you don't have to exit out. However those lockers (the large ones) might already be in use when you get there. There should be also lockers at Shibuya Station, however I have not used lockers at Shibuya before to comment.