models.sequelize.transaction(function (t) {
return models.Banks.findOne({where: {
money: {
$gt: 0
}
}, lock: t.LOCK.UPDATE, transaction: t }).then(function(bank){
bank.money -= amountToWithdraw;
return bank.save({transaction: t});
})
})