Locks can typically last a couple of hours or as you have witnessed a couple of days.
I have noticed a few times if my male unlocks say in the morning and i havent had chance to remove him until i get back from work he will be locked up again.
The golden rules quoted usually on here are 3 days on and then 3 days off to feed and rest. If he locks right away then remove him afterwards for an extra long rest. Some people do things slightly different but usually a variation on this theme.
Just keep doing what you are doing and if they lock good on ya and hope you see some ovys and some eggs in the future