STX would unlock when none of the committed STX clings to a slot (typically when the minimum goes up and the stacked amount is insufficient).
Atleast when the user logs in they should be informed of this so they know they need to take action for a chance to earn in the future.
Stack-stx calls are sent with a burnchain block height upto which the STX should be locked. When they are not locked before that bitcoin block height one can assume it is because they unlocked due to not clinging to a slot in a previous cycle.
Some options would be (A) Stack in a pool, (B) try again with a higher amount or (C) take another chance with less.