Keeps and Stone Wall Towers can be upgraded with Boiling Oil Technology from the Keep to have the Hot Oil attack.
The Hot Oil attack does 30 base damage without any Ranged Attack (+1/+2/+3) upgrades from the Blacksmith.
Currently, the bonus damage (+1/+2/+3) from the Ranged Attack upgrade only applies to the Hot Oil attack of future Keeps and Stone Wall Towers.
Existing Keeps and Stone Wall Towers that already have the Hot Oil attack do not have their Hot Oil attack damage updated.
For example, assuming you have Boiling Oil researched, if you build a Stone Wall Tower with 0 Ranged Attack upgrades, the Hot Oil attack will have 30 damage. If you upgrade to +3 Ranged Attack, that existing Stone Wall Tower Hot Oil attack damage will not update and will remain at 30. Building a new Stone Wall Tower then has a correct Hot Oil attack damage of 33.
Test Environment: Skirmish with at least 3 different civilizations.
Build: 5.0.9369.0