Knee locking!

I'm so mega peed right now. My knee started locking a couple years ago not long before I decided to start losing weight actually. When I was bending to put the washing in, picking something up ect it would just lock and I'd have to force myself to be able to move it back whilst being in tremendous amounts of pain, but the pain didn't last long!

Had it around a week ago for what seemed to be no reason or cause at all and it's just happened again messing around with my son but this time the pain doesn't seem to be wanting to go. Has anyone else got or had this happen often to them before and if so is there anything you can do about it, to make it less common, painful ect. Obviously never bending down or twisting my body ever again is not an option!

:-(