It could mean just try to put bad thoughts aside until the workday/workweek ends and really try to get intentional tunnel vision. In a corporate world of hell capitalism, I get it. Not a great sign that we have slang for it, but I get it.
It could also mean emotionally disconnect for the next while and just do what's mechanically important (work, often gym). This one's worse and it's what you're thinking of.
Traditionally, to be "locked in" on something would mean to be locked in on your target, goal, etc.
Telling someone to lock in or "lock it in" is kind of like a nice way of saying "get your shit together" or "focus up". I hear it in sports/ gaming lingo.
I mean that's the point kind of haha. I know some people use the lingo unironically, but if I tell my homies I'm bout to lock in, clutch up, and secure the dub, I don't want them to take me seriously, lmao.
When my buddies are playing, and we're being loud, telling jokes, and generally goofing around instead of paying attention, one of the common things we'll jokingly say when the laughter dies down is "alright alright alright, focus up guys, let's focus up".