How do I write a udev rule to persist an attribute on boot?

The correct syntax for the rules file was:

SUBSYSTEM=="platform", DRIVER=="lg-laptop", ATTR{fn_lock}="1"

I think my mistake was probably ATTRS{fn_lock} instead of ATTR{fn_lock}, since the matching rules (ones with == operator) seem to be a bit flexible.