UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LFH4g4zOe+OBljAMHrvOT5/iC3Rg7put8dxpnOXMwyw='
WHERE
key_id = '489e3b77f9f7109b809dabbe7e43338ff93063d317e4e551363a91b706e3c325'
AND (
token = 'LFH4g4zOe+OBljAMHrvOT5/iC3Rg7put8dxpnOXMwyw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)