Simple locking mechanism on top of PDO