Share your experience!
First, sorry about my english that can make you be confuse/misunderstand.
This bug I've found on KitKat but now I've just got it last night on latest firmware (5.1.1 23.4.A.0.580). You know Xperia phones will automatically turn off screen and lock after 5 seconds when it's putted the face down on a surface (proximity sensor is close/covered with the surface). But the phone will be locked even the proximity sensor is not covered if rotation is off. It means when turn off rotation (swipe down twice times status bar and you can see it in quick setting or go to the Setting -> Display) and the phone's screen is parallel to surface (here is the surface that I lie on my back), the phone still be locked as it's putted on the surface even it does not (mean still have a distance between the proximity sensor and the surface). I got that issue when I lie on my back and use my phone.
I am not sure I understand this (and the problem is not your English). The phone will lock after 5-15-30 etc seconds after sleep except when kept on by smart lock. There isn't anything related to the proximity sensor. I have flip case but that doesn't influence how fast the phone will lock itself. First, those 30 seconds have to pass (the display timeout) and then the next 5-15 etc after sleep for the device to lock.