UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mu8c/ogCpQphXxNmxkDaMRK3ZcQoE0NUYP5QhdOdZX4='
WHERE
key_id = '6b9fc7dcc6668935881fca92312c968fac8568aaeee1ba77e3d0725e40f39e13'
AND (
token = 'Mu8c/ogCpQphXxNmxkDaMRK3ZcQoE0NUYP5QhdOdZX4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)