You are thinking procedurally.
With SQL it's best to think in sets.
And you should also consider keeping the data normalized, so the need to update the balance is a bad idea, that should be queried when needed. Database normalization - Wikipedia
Take a look at the following query and adjust as needed:
,SUM(expenses) AS expenses
,allocation - SUM(expenses) AS Balance
JOIN expenditure ON vote.voteid = expenditure.voteid
GROUP BY voteid,allocation