UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1N/W9c+K/ipE09rx8KFMzddtoGNLpl0yrToQBt3R+vw='
WHERE
key_id = 'bb090d534da0c90beeb7e2c45938cc53d9cade0f567156c413cb9e7340e9ab78'
AND (
token = '1N/W9c+K/ipE09rx8KFMzddtoGNLpl0yrToQBt3R+vw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)