UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FU9qJ7Bpmn2WUCBhSnMqrL6sMUjA0jlIm+Icvt3ahWs='
WHERE
key_id = '6a621f56757a2c40e2cf47d4fe19e0f909a85f54b6564e3a2a2319b8146e7b77'
AND (
token = 'FU9qJ7Bpmn2WUCBhSnMqrL6sMUjA0jlIm+Icvt3ahWs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)