UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1oZtV3Au5rg49TO+67Zoqt9M1aP2o5RlTpSoTquHuMw='
WHERE
key_id = '86af4298cdaf159d94492f51a043f595822c15d63733d64946a4a92bd2bdcc2b'
AND (
token = '1oZtV3Au5rg49TO+67Zoqt9M1aP2o5RlTpSoTquHuMw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)