Fix action logging SQL query

Follow-up for Ia68a0ec5df629b8d4d8221a87bca5a777463d6f5

Change-Id: I2506e0c0cee695fdd8ea05a36b7ac40121ab1c94