You're leaving your office to go out to lunch with a coworker. You brought a valuable item to work today. You don't think anyone would steal it in your office, but you want to be careful. You say this to yourself.
I'd better lock it up just in case.
You use this expression to express something that you should do. But while "I should" is often used to talk about things that you need to do in the future, "I'd better" is mostly used for things that you can do now, which don't take much effort:
I should call my mother soon.
I'd better get going, or I'll be late.
You "lock" a door, a window, a safe, etc. But when you're talking about the things inside that you're protecting, you say "lock up ___" or "lock ___ up":
Make sure to lock up the house before you go out.
She locked up her wallet and cell phone in the hotel safe before going out to the pool.
To do something "just in case" means that you're doing it even though you don't think it's needed. You're doing it to be extra careful.
The phrase "in case" can be continued to "in case (clause)":
Take some water in case you get thirsty.
I like to keep an extra set of towels in case someone comes over to visit.
(Print this lesson)