UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4eAWOW2/q3N9/V5LuR3/L1Y1KdlP7+D/mlVvCnKM3nk='
WHERE
key_id = 'd1140afdb33822c4e37df5661823bf1b292b481ff2bf080e3e1fb6a2c277f698'
AND (
token = '4eAWOW2/q3N9/V5LuR3/L1Y1KdlP7+D/mlVvCnKM3nk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)