update lock with pg