How can I check if user is locked using query?
I tried that query:
Is this ok? I do not have access to other users so I cannot check if the query is okay.
No. Treat lockedCount as number of consecutive unsuccessful attempts.
To determine if user is currently locked you start by checking Locked Date & Locked Time. If those have values, then you have to look at Locked User Expire (in profile or SysSecDefaults) to see if lock will not happen after all (0), remains until manually unlocked (-1), or is automatically unlocked after some number of minutes (without resetting Locked Date & Locked Time).